import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from "vue-router" //引入路由
import { broadcast } from "./router"
let router = createRouter({
  // hash路由
  // history: createWebHashHistory(),
  //History 路由
  history: createWebHistory(),
  routes: broadcast,
  // 滚动行为
  scrollBehavior(to, from, savedPosition) {
    return {
      left: 0,
      top: 0,
    }
  },
})
export default router
